<table>
    <tbody>
        <tr>
            <td>发货单号</td>
            <td>{{ $delivery->delivery_no }}</td>
        </tr>
        <tr>
            <td>发货时间</td>
            <td>{{ $delivery->delivered_at }}</td>
        </tr>
        <tr>
            <td>状态</td>
            <td>{{ \App\Models\CustomerDelivery\CustomerDelivery::$_status[$delivery->status] }}</td>
        </tr>
        <tr>
            <td>收货地址</td>
            <td>{{ $delivery->d_address }}</td>
        </tr>
        <tr>
            <td>SKU总数</td>
            <td>{{ $delivery->total_sku }}</td>
        </tr>
        <tr>
            <td>产品总件数</td>
            <td>{{ $delivery->total_unit }}</td>
        </tr>
        <tr>
            <td>实发产品总件数</td>
            <td>{{ $delivery->ship_total_unit }}</td>
        </tr>
        <tr>
            <td>包裹总数</td>
            <td>{{ $delivery->total_box }}</td>
        </tr>
        <tr>
            <td>发货总成本</td>
            <td>{{ $delivery->total_unit_price }}</td>
        </tr>
        <tr>
            <td>追踪号</td>
            <td>{{ $delivery->delivery_logistics->tracking_no ?? '' }}</td>
        </tr>
        <tr>
            <td>备注</td>
            <td>{{ $delivery->remarks }}</td>
        </tr>
    </tbody>
</table>
<table>
    <thead>
    <tr>
        <th>SKU</th>
        <th>产品名称</th>
        <th>FNSKU</th>
        <th>数量</th>
        <th>发货数量</th>
    </tr>
    </thead>
    <tbody>
    @foreach($delivery->detail as $item)
        <tr>
            <td>{{ $item->sku->psku_code ?? '' }}</td>
            <td>{{ $item->sku->psku_cn ?? '' }}</td>
            <td>{{ $item->fnsku }}</td>
            <td>{{ $item->apply_num }}</td>
            <td>{{ $item->ship_num }}</td>
        </tr>
    @endforeach
    </tbody>
</table>
